package com.ys.other;

import java.util.ArrayList;
import java.util.List;

/**
 * 描述: TODO
 *
 * @author CodeYang
 * @version 2021/1/18 21:53
 */

class Person {
    String name="person";
    public void shout(){
        System.out.println(name);
    }
}
class Student extends Person{
    String name="student";
    String school="school";
}
public class P4test {

    public static void main(String[] args) {
//        Person person = new Person();
//        // 因为 Person  类型转换 错误
//        System.out.println(person instanceof  System);

        List<String> list=new ArrayList<String>();
        list.add("str1");
        list.add(2, "str2");
        String s=list.get(1);
        System.out.println(s);
    }

    static void test(){

    }
    void test2(){
        test();
    }
}
